|2010 CM$=CHR$(44):QM$=CHR$(34) 'Comma and Quote mark
|2020 BLINKNORMAL%=|28:BLINKINSERT%=|29:BLINK2%=|30 'For CGA or EGA adapter, BLINKNORMAL%=6, BLINKINSERT%=4 and BLINK2%=7. For Monochrome adapter, BLINKNORMAL%=13, BLINKINSERT%=9 and BLINK2%=14.
2030 CLS
2040 LOCATE 1,16,0
2050 COLOR COLA%(2),COLA%(1)
|2060 PRINT "PDS*BASE Data Base Clone Out Program |01";:COLOR COLA%(2),0
2070 PRINT:PRINT:COLOR COLA%(2),0:PRINT "This program will Clone Out all live records presently in the ";ZB$
2080 PRINT "Data Base file(s). The Cloned Out ASCII file records will include all data":PRINT "base file pointers. The Cloned Out file(s) can be Cloned In to the Re-Sized"
2090 PRINT "Data Base file(s).":PRINT:PRINT "The files will be created with the same names as the '.DAT' file(s) except":PRINT "that they will have '.PDS' as the file name extender.":PRINT:POSX%=CSRLIN+1
2120 IF D$="" OR D$=" " THEN BEEP:LOCATE 24,6,0:COLOR 15,0:PRINT "No Drive Letter entered - This file will be skipped - Strike any key";:COLOR 7,0:A$=INPUT$(1):LOCATE 24,1:PRINT SPC(79):LOCATE POSX+2,1:PRINT SPC(79):GOTO 2280
2130 COLOR 0,COLA%(3):PRINT D$;:COLOR 7,0:X=INSTR(ZS$(J,1),"."):F$=D$+":"+LEFT$(ZS$(J,1),X)+"PDS":OPEN F$ FOR OUTPUT AS #ZQ+1:LOCATE POSX%+3,32,0:PRINT "Read W/Data";
2140 FOR ZR=1 TO ZS%(J,2)
2150 LOCATE POSX%+5,31:PRINT ZR;:ZA=J:ZZ=1:GOSUB 610 'read each record
*28 2160 IF ZL$=STRING$(ZSIZE%(J,ZS%(J,10)),32) THEN GOTO 2250 ELSE LOCATE POSX%+5,39:PRINT ZR;" ";
*23 2160 IF ZS%(J,1)=1 THEN IF ZL$=STRING$(ZSIZE%(J,ZS%(J,10)),32) THEN GOTO 2250 ELSE LOCATE POSX%+5,39:PRINT ZR;" ";:GOTO 2200
*23 2170 SKIP%=1:FOR K=1 TO ZS%(J,7):IF Y$(K,J)<>STRING$(ZSIZE%(J,K),32) THEN SKIP%=0:K=ZS%(J,7)
*28 2200 FOR K=1 TO ZS%(J,7)-1:PRINT #ZQ+1, QM$;Y$(K,J);QM$;CM$;:NEXT:PRINT #ZQ+1, QM$;Y$(ZS%(J,7),J);QM$
*23 2200 IF ZS%(J,4) > 0 THEN FOR K=1 TO ZS%(J,4):PRINT #ZQ+1, ZH$(J,K);CM$;ZE$(J,K);CM$;:NEXT
*23 2230 FOR K=1 TO ZS%(J,7)-1:PRINT #ZQ+1, QM$;Y$(K,J);QM$;CM$;:NEXT:PRINT #ZQ+1, QM$;Y$(ZS%(J,7),J);QM$
2250 NEXT 'ZR
2260 CLOSE ZQ+1
2270 LOCATE 24,1,0:PRINT SPC(79):LOCATE 24,7:PRINT "All ";ZS$(J,1);" records Cloned Out - Strike any key to continue";:A$=INPUT$(1):LOCATE 24,1,0:PRINT SPC(79)